import XmTable from './table/XmTable'
import XmSelect from './select/XmSelect'
import XmEmpty from './empty/XmEmpty'
import XmMap from './map/XmMap'
import XmUpload from './upload/XmUpload'
import XmCascader from './select/XmCascader'

import businessComponents from './businessComponents'

const components = [
  XmTable,
  XmSelect,
  XmEmpty,
  XmMap,
  XmUpload,
  XmCascader,
  ...businessComponents
]

const install = function(Vue) {
  if (install.installed) return;
  components.forEach(component => Vue.component(component.name, component))
};

export default {
  install,
  ...components
}